//
//  OneDayThreeTableViewCell.m
//  news
//
//  Created by imacbookair on 16/3/10.
//  Copyright © 2016年 imacbookair. All rights reserved.
//

#import "OneDayThreeTableViewCell.h"

@implementation OneDayThreeTableViewCell


#pragma mark - 初始化

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // 背景
        self.bottom = [[UIImageView alloc]init];
        _bottom.image = [UIImage imageNamed:@"bai"];
        _bottom.layer.borderWidth = 0.2;
        _bottom.layer.cornerRadius = 3;
        _bottom.clipsToBounds = YES;
        _bottom.layer.borderColor = [UIColor grayColor].CGColor;
        
        // 图片
        self.picture = [[UIImageView alloc]init];
        
        // 标题
        self.title = [[UILabel alloc]init];
        _title.font = [UIFont systemFontOfSize:20];
        _title.numberOfLines = 0;
        
        // 内容
        self.content = [[UILabel alloc]init];
        _content.textColor = [UIColor grayColor];
        _content.numberOfLines = 0;
        
        // 数量
        self.count = [[UILabel alloc]init];
        _count.textColor = [UIColor grayColor];
        _count.textAlignment = NSTextAlignmentRight;
        
        [self.contentView addSubview:_bottom];
        
        [self.bottom addSubview:_picture];
        [self.bottom addSubview:_title];
        [self.bottom addSubview:_content];
        [self.bottom addSubview:_count];
        
        [_bottom NightWithType:UIViewColorTypeNormal];
        [_picture NightWithType:UIViewColorTypeNormal];
        [_title NightWithType:UIViewColorTypeNormal];
        [_content NightWithType:UIViewColorTypeNormal];
        [_count NightWithType:UIViewColorTypeNormal];
        
    }
    return self;
}

#pragma mark - 布局
- (void)layoutSubviews
{
    [super layoutSubviews];
    _bottom.frame = CGRectMake(10, 10, 350, 320);
    _picture.frame = CGRectMake(10, 10, 330, 150);
    _title.frame = CGRectMake(10, 170, 330, 60);
    _content.frame = CGRectMake(10, 230, 330, 60);
    _count.frame = CGRectMake(240, 290, 90, 30);
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
